package com.bana.fvs.app.mvp.model;

import com.bana.fvs.app.mvp.ConstantsValue;
import com.bana.fvs.app.mvp.contract.FoglightContract;
import com.bana.fvs.app.util.CommonUtils;
import com.wei.commonlibrary.net.OkhttpRequest;

import java.util.HashMap;

/**
 * Created by wei on 2018/3/2.
 */

public class FoglightModel extends FoglightContract.AbsFoglightModel {
    @Override
    public void onStart() {

    }


    @Override
    public OkhttpRequest getFoglightMode(String token) {
        HashMap<String, Object> params = CommonUtils.getParams(token);
        HashMap<String, Object> data = new HashMap<>();

        data.put("dmlb", "01021");

       params.put("data",data);

        return okhttpRequest.url(iApiService.getFoglightCtrlDict(params));
    }

    @Override
    public OkhttpRequest http_foglightWorkModeUpdate(String token, HashMap<String, Object> data) {
        HashMap<String, Object> params = CommonUtils.getParams(token);
        params.put("data",data);

        return okhttpRequest.url(iApiService.getFoglightUpdate(params));
    }

    @Override
    public OkhttpRequest http_getStrategies(String token, HashMap<String, Object> data) {
        HashMap<String, Object> params = CommonUtils.getParams(token);
        params.put("data",data);

        return okhttpRequest.url(iApiService.getStrategies(params));
    }

    @Override
    public OkhttpRequest http_getControllers(String token, HashMap<String, Object> data) {
        HashMap<String, Object> params = CommonUtils.getParams(token);
        params.put("data",data);

        return okhttpRequest.url(iApiService.getControllers(params));
    }
}
